import { reactive, ref } from 'vue';

// 设置table的自适应高度值
export default function usePagInfo() {
    const pageInfo = reactive({
        pageNum: 1,
        total: 50,
        pageSize: 10,
    });
    // 分页的页码改变
    const changePage = (page: number) => {
        pageInfo.pageNum = page;
    };

    // 分页的条数
    const changePageSize = (pageSize: number) => {
        pageInfo.pageSize = pageSize;
    };
    return {
        pageInfo,
        changePage,
        changePageSize,
    };
}
